#include<cstdio>
#include<cstring>
#include<algorithm>
#include<cmath>
using namespace std;
typedef long long LL;
typedef double db;
inline int read()
{
	int x=0,f=1;
	char ch=getchar();
	while(ch<'0'||ch>'9') { if(ch=='-')f=-1; ch=getchar(); }
	while(ch>='0'&&ch<='9') { x=(x<<1)+(x<<3)+ch-'0'; ch=getchar(); }
	return x*f;
}
const int MAXN=110,INF=0x3f3f3f3f;
const db eps=1e-5;
int n,match[MAXN];
db e[MAXN][MAXN],lx[MAXN],ly[MAXN],slack[MAXN];
bool visx[MAXN],visy[MAXN];
struct point
{
	db x,y;
}p[MAXN];
db dis(db x1,db y1,db x2,db y2)
{
	return sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
}
bool dfs(int x)
{
	visx[x]=true;
	for(int y=1;y<=n;++y)
	{
		if(visy[y])continue;
		db t=lx[x]+ly[y]-e[x][y];
		if(t<=eps)
		{
			visy[y]=true;
			if(!match[y]||dfs(match[y]))
			{
				match[y]=x;
				return true;
			}
		}
		else slack[y]=min(slack[y],t);
	}
	return false;
}
void KM()
{
	for(int i=1;i<=n;++i)
		for(int j=1;j<=n;++j)
			lx[i]=max(lx[i],e[i][j]);
	for(int i=1;i<=n;++i)
	{
		for(int j=1;j<=n;++j)slack[j]=INF;
		while(true)
		{
			memset(visx,0,sizeof(visx));
			memset(visy,0,sizeof(visy));
			if(dfs(i))break;
			db d=INF;
			for(int j=1;j<=n;++j)if(!visy[j])d=min(d,slack[j]);
			for(int j=1;j<=n;++j)
			{
				if(visx[j])lx[j]-=d;
				if(visy[j])ly[j]+=d;
				else slack[j]-=d;
			}
		}
	}
}
int main()
{
	n=read();
	for(int i=1;i<=n;++i)
		scanf("%lf%lf",&p[i].x,&p[i].y);
	for(int i=1;i<=n;++i)
	{
		db x,y;
		scanf("%lf%lf",&x,&y);
		for(int j=1;j<=n;++j)
			e[i][j]=-dis(p[j].x,p[j].y,x,y);
	}
	KM();
	for(int i=1;i<=n;++i)printf("%d\n",match[i]);
	return 0;
}
